Repository navigation
feat(tray): list hosts entries in the Linux tray menu for quick switching - #1069
Open
omerfarukkykc wants to merge 2 commits into
Open
omerfarukkykc wants to merge 2 commits into
omerfarukkykc wants to merge 2 commits into
Conversation
…hing Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The local show_main_window wrapper in tray.rs is compiled only on non-macOS targets, but toggle_hosts_from_menu is built everywhere, which broke cargo test on the macOS runner (E0425). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
On Linux, the tray menu now lists every hosts entry as a check item above the existing items, so a configuration can be switched straight from the top bar. Nothing changes on macOS or Windows.
Why
I understand from #1053 that switching is meant to live in the tray mini window. On Linux that window is never reachable: GTK status icons only expose a menu, so the tray currently offers just "Show Main Window" and "Quit". This PR is limited to that gap rather than adding a second interface where the mini window already works.
GET /api/toggle(extracted astoggle_by_id), so it works with no main window and respects choice mode and folder rules.Testing
cargo test --locked --manifest-path src-tauri/Cargo.tomlpasses. Manually tested on Ubuntu (GNOME): toggling, adding and deleting entries. Not tested on macOS/Windows; the new menu items are gated to Linux.After Changes
🤖 Generated with Claude Code